package com.prs.crm.report;

import java.util.ArrayList;
import java.util.Collection;

/**
 * 报表生成数据源
 * @author prs.chenzhi
 *
 */
public class ReportTable implements java.io.Serializable{

	private static final long serialVersionUID = 1L;


	private String name;
	

	private Collection<ReportCell> cells;
	
	private Collection<?> dataSource;
	
	public ReportTable(String name)
	{
		this.name = name;
	}
	
	public void setCells(Collection<ReportCell> cells) {
		this.cells = cells;
	}

	public Collection<ReportCell> getCells() {
		return cells;
	}



	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setDataSource(Collection<?> dataSource) {
		this.dataSource = dataSource;
	}

	public Collection<?> getDataSource() {
		return dataSource;
	}
	
	/**
	 * 添加报表单元格定义
	 * @param cell
	 */
	public void addCell(ReportCell cell)
	{
		if (cells==null)
		{
			this.cells = new ArrayList<ReportCell>();
		}
		this.cells.add(cell);
	}
}
